<template>
	<div id="app" v-title data-title="您无权限">
		<!-- <v-title title="您无权限"></v-title> -->
		<div class="wrap">
			<!-- <img src="../common/images/404.png" alt="" style="margin:0 auto;"> -->
			<!-- <div class="title mt10">无权限！</div> -->
			<div class="text mt10 ta-c">无权限访问或功能尚未开放！</div>
			<div class="text mt10 ta-c">您所访问的页面尚未开放或您无权限访问。</div>
			<div class="text mt10 ta-c">请点击下方按钮返回首页。</div>
			<div class="btn" @click="returnIndex">返回首页</div>
		</div>
	</div>
</template>

<script>
// import title from 'components/commons/title.vue';
import * as ThreeStorage from '@/utils/store/token.js'
export default {
  name: 'noPerm',
  data() {
    return {
      // errorImg:require('@assets/images/commons/404.png'),
    }
  },
  methods: {
    returnIndex: function() {
      // 回到首页
      if (ThreeStorage.getRolesVal()) {
        this.$router.push({ name: 'bid-home' })
      } else {
        if (ThreeStorage.isHaveLoginType()) {
          const loginType = ThreeStorage.getLoginType()
          if (loginType === 'driver') {
            this.$router.push({ name: 'me-driverLanding' })
          } else if (loginType === 'company') {
            this.$router.push({ name: 'me-adminLanding' })
          }
        } else {
          this.$store.dispatch('FedLogOut')
        }
      }
    }
  },
  components: {
	  // "v-title" : title
  }
}

</script>


<style lang="css" scoped>
#app{
	background: #fff;
	min-height: 100%;
	position: absolute;
	width: 100%;
}
.wrap{
	text-align: center;
	padding-top: 1rem;
}
.wrap img{
	width: 2.1rem;
}
.title{
	color: #2a7ac3;
	font-size: 0.18rem;
}
.text{
	color: #999;
	font-size: 0.16rem;
}
.btn{
	/* background: -webkit-gradient(linear, 0 0, 0 bottom, from(#ff4939), to(#ff4d3b)); */
	background-color: #01a4f6;
	line-height: 0.5rem;
	color: #fff;
	font-size: 0.16rem;
	border-radius: 100px;
	-webkit-border-radius:100px;
	margin : 0.2rem auto;
	width: 2rem;
}
</style>
